home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
science
/
sm32a.zip
/
LIBRARY
/
ABS.LI
next >
Wrap
Text File
|
1993-10-16
|
258b
|
11 lines
# abs(x) is the absolute value function of x. The value of abs(x)
# is real number >=0. abs(x)=|x|.
# e.g. abs(-2) gives 2, abs(-i) gives 1
abs(zero) := zero
abs(e) := e
abs(pi) := pi
abs(inf) := inf
abs(-zero) := zero
abs(x_) := if(x>0, x, -x)